﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineAuction.NormalUser
{
    public partial class NormalUser : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session != null)
            {
                Session["previous"] = null;
                int check = 0;
                if (Session["state"] != null)
                {
                    check = (int) Session["state"];
                }
                if (check < 1) //User chua login bang quyen Manager
                {
                    Session["previous"] = "../NormalUser/Default.aspx";
                    Response.Redirect("../Guest/Login.aspx");
                }
                else
                {
                    lblUsername.Text = Session["server"].ToString() + '@' + Session["username"].ToString();

                }
            }
            else
            {
                Response.Redirect("../Guest/Login.aspx");
            }
        }
    }
}
